{% extends '../base.html' %}
{% block title %}主页{% endblock %}
{% block content %}
    {% if request.session.is_login %}
    <h1 align="center">你好,欢迎{{ request.session.user_name }}！！</h1>
    <div class="col-sm-9 col-md-push-3">
    <div class="row">
      <div class="col-xs-4 col-sm-6">

<!--    <div class="row">-->
        {% for collect in collect_list %}
<!--      <div class="col-xs-4 col-md-push-3">-->
        <div class="thumbnail">
          <img src="{{ MEDIA_URL }}{{ collect.photo }}" alt="Angry" height="150px" width="300px" >
          <div class="caption">
            <h3>{{collect.name}}</h3>
            <p>{{collect.type}}</p>
            <p><a href="/blog/detail/{{collect.id}}" class="btn btn-primary" role="button">查看</a>
<!--                <a href="#" class="btn btn-default" role="button">{{collect.name}}</a>-->
            </p>
          </div>
        </div>
<!--      </div>-->
            {% endfor %}
<!--    </div>-->

      </div>
      <div class="col-xs-4 col-sm-6">
          <h2>最新药用植物</h2>
           {% for collect in top5_collect_list %}
           <h4><a href="/blog/detail/{{collect.id}}">{{collect.name}}</a></h4>
           {%endfor%}
      </div>
    </div>
<!--可视化 -->
    {% else %}
    <h1>你尚未登录，只能访问公开内容！</h1>
    {% endif %}
{% endblock %}
